import { PrimaryColumn , Column, Entity , OneToMany } from 'typeorm';
import { MemoLists } from './memo_lists';

@Entity()
class NoteOwnType {

    @PrimaryColumn()
    id: number;

    @Column({
        type: "varchar",
        length: 255,
        nullable: false,
    })
    name: string;

    @Column({
        type: "varchar",
        length: 255,
        nullable: false,
        unique: true,
    })
    value: string;

    @OneToMany(type => MemoLists, memoLists => memoLists.noteOwnType)
    memoLists: MemoLists;
}

export { NoteOwnType }